package reflect;

import java.lang.reflect.Method;

public class ReflectDemo7 {
    public static void main(String[] args)throws Exception {
        Class cls = Class.forName("reflect.Person");
        Object o = cls.newInstance();

        Method method1 = cls.getDeclaredMethod("hehe");
        method1.setAccessible(true);
        method1.invoke(o);
        method1.setAccessible(false);
    }
}
